package com.itheima.Test;

import java.util.Random;

public class ArrayTest05 {
    public static void main(String[] args) {
        Random rand = new Random();
        int[] arr = new int[10];
        for (int i = 0; i < 10; i++) {
            arr[i] = rand.nextInt(100) + 1;
        }
        int sum = 0;
        for (int i = 0; i < arr.length; i++) {
            sum += arr[i];
        }
        double avg = sum / arr.length;
        int count = 0;
        for (int i = 0; i < arr.length; i++) {
            if(arr[i] < avg) {
                count++;
            }
        }
        System.out.println(sum);
        System.out.println(avg);
        System.out.println(count);
    }
}
